<template>
	<view class="balance_detail">
		<view class="navbar">
			<view v-for="(item, index) in navList" :key="index" class="nav_item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">
				{{ item.text }}
			</view>
		</view>
		<view class="balance_detail_list">
			<view class="balance_detail_list_item">
				<view class="balance_detail_info">
					<text>转账收款到余额</text>
					<text>-100.00</text>
				</view>
				<view class="balance_detail_date">
					<text>2021-08-23  09:46:39</text>
					<text>余额 0.00</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabCurrentIndex: 0,
				navList: [{ // nav列表
					text: '支出',
					orderList: []
				}, {
					state: 1,
					text: '收入',
					orderList: []
				}],
			}
		},
		onLoad() {
		},
		
		components: {
		},
		
		methods: {
			//顶部tab点击
			tabClick(index) {
				this.tabCurrentIndex = index;
			}
		}
	}
</script>

<style lang="less" scoped>
	.navbar {
		display: flex;
		height: 80rpx;
		background-color: #f7f7f7;
		border-bottom: 1px solid #E5E5E5;
		position: relative;
		z-index: 10;
		.nav_item {
			flex: 1;
			display: flex;
			justify-content: center;
			align-items: center;
			height: 100%;
			font-size: 30rpx;
			color: #000;
			position: relative;
			&.current {
				color: #D1A764;
				&:after {
					content: '';
					position: absolute;
					left: 50%;
					bottom: 0;
					transform: translateX(-50%);
					width: 44px;
					height: 0;
					border-bottom: 2px solid #C5A36C;
				}
			}
		}
	}
	.balance_detail_list {
		padding: 0 34rpx 30rpx;
		.balance_detail_list_item {
			padding: 0 13rpx;
			padding-top: 30rpx;
			border-bottom: 1px solid #D2D2D2;
		}
		.balance_detail_list_item view {
			display: flex;
			justify-content: space-between;
		}
		.balance_detail_info {
			font-size: 30rpx;
			padding-bottom: 30rpx;
		}
		.balance_detail_date {
			font-size: 24rpx;
			color: #999999;
			padding-bottom: 32rpx;
		}
	}
</style>
